1. Field of the Invention
The present invention relates to a method, system, and program for handling device interrupts in a multi-processor environment.
2. Description of the Related Art
Computer systems may have a variety of devices including printers, network interfaces, keyboards, and disk drives which send or receive data within the system. These devices indicate the need to communicate with the rest of the system using what is commonly called an “interrupt.” For example, a network controller might interrupt to signal the arrival of a new packet from the network or the successful transmission of a packet onto the network. Devices may signal the occurrence of other types of events using an interrupt.
The computer system typically has an interrupt handler which processes the event or events which triggered the interrupt. For example, many computer operating systems, such as Microsoft Windows®, Linux®, Unix®, etc., have an interrupt service routine (ISR) which responds to the receipt of an interrupt from various devices. (Microsoft and Windows are registered trademarks of Microsoft Corporation, Linux is a registered trademark of Linus Torvalds, UNIX is a registered trademark of The Open Group). These and other operating systems also execute various device driver programs that provide a software interface between the operating system and an associated device. A device driver includes device specific commands to communicate with and control the associated device. These device specific commands may be issued by an interrupt handler within the device driver (such as a device driver interrupt service routine (ISR)) for handling an interrupt generated by the associated device.
In many operating systems, upon receiving a device interrupt, the operating system identifies the device driver associated with the device that asserted the interrupt, and causes the device driver interrupt handler to be executed. Some operating systems, referred to as multiprocessing or parallel processing operating systems, permit running one or more programs on more than one processor such as a central processing unit (CPU). In computer systems having more than one CPU, various schemes have been proposed for the selection of the particular CPU to execute an interrupt handler. Some operating systems such as Microsoft Windows® have a task scheduler which selects the CPU to execute a task. In general the operating system task scheduler will select the CPU having the lightest load to execute the next task. Another technique routes all interrupts to a single processor for handling. Other systems utilize hardware-based “round-robin” algorithms which distribute interrupts evenly to processors of the system.
It is believed that there is a need in the art to provide improved techniques for executing interrupt handlers in a multiple processor computer system.